package com.sxxm.qxgl.controller;


import com.sxxm.qxgl.entity.RoleDept;
import com.sxxm.qxgl.entity.RoleMenu;
import com.sxxm.qxgl.service.RoleDeptService;
import com.sxxm.qxgl.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author qjw
 * @since 2021-09-20
 */
@RestController
@Api(value = "角色-部门", tags = "角色-部门")
@RequestMapping("/role-dept")
public class RoleDeptController {
    RoleDeptService roleDeptService;
    public RoleDeptController(RoleDeptService roleDeptService){
        this.roleDeptService=roleDeptService;
    }
    @ApiOperation("部门添加角色")
    @PostMapping("/tjyh")
    public Result tjyh(@RequestBody List<RoleDept> userRoles){
        return roleDeptService.Batch_add(userRoles);
    }

    @ApiOperation("部门删除角色")
    @PostMapping("/Delete")
    public Result Delete(@RequestBody List<RoleDept> userRoles){
        return roleDeptService.Delete(userRoles);
    }
}

